load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

go_library(
    name = "go_default_library",
    srcs = [
        "clone-create-mutator.go",
        "migration-create-mutator.go",
        "preset.go",
        "vm-mutator.go",
        "vmi-mutator.go",
    ],
    importpath = "kubevirt.io/kubevirt/pkg/virt-api/webhooks/mutating-webhook/mutators",
    visibility = ["//visibility:public"],
    deps = [
        "//pkg/apimachinery/patch:go_default_library",
        "//pkg/defaults:go_default_library",
        "//pkg/instancetype/webhooks/vm:go_default_library",
        "//pkg/pointer:go_default_library",
        "//pkg/util/webhooks:go_default_library",
        "//pkg/virt-api/webhooks:go_default_library",
        "//pkg/virt-config:go_default_library",
        "//staging/src/kubevirt.io/api/clone:go_default_library",
        "//staging/src/kubevirt.io/api/clone/v1beta1:go_default_library",
        "//staging/src/kubevirt.io/api/core:go_default_library",
        "//staging/src/kubevirt.io/api/core/v1:go_default_library",
        "//staging/src/kubevirt.io/client-go/kubecli:go_default_library",
        "//staging/src/kubevirt.io/client-go/log:go_default_library",
        "//vendor/github.com/google/uuid:go_default_library",
        "//vendor/k8s.io/api/admission/v1:go_default_library",
        "//vendor/k8s.io/api/core/v1:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/api/equality:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/types:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/util/errors:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/util/rand:go_default_library",
        "//vendor/k8s.io/client-go/tools/cache:go_default_library",
    ],
)

go_test(
    name = "go_default_test",
    srcs = [
        "clone-create-mutator_test.go",
        "migration-create-mutator_test.go",
        "mutators_suite_test.go",
        "preset_test.go",
        "vm-mutator_test.go",
        "vmi-mutator_test.go",
    ],
    embed = [":go_default_library"],
    race = "on",
    deps = [
        "//pkg/apimachinery/patch:go_default_library",
        "//pkg/instancetype/webhooks/vm:go_default_library",
        "//pkg/libvmi:go_default_library",
        "//pkg/pointer:go_default_library",
        "//pkg/testutils:go_default_library",
        "//pkg/virt-api/webhooks:go_default_library",
        "//pkg/virt-config/featuregate:go_default_library",
        "//pkg/virt-handler/node-labeller/util:go_default_library",
        "//pkg/virt-operator/resource/generate/components:go_default_library",
        "//staging/src/kubevirt.io/api/clone:go_default_library",
        "//staging/src/kubevirt.io/api/clone/v1beta1:go_default_library",
        "//staging/src/kubevirt.io/api/core:go_default_library",
        "//staging/src/kubevirt.io/api/core/v1:go_default_library",
        "//staging/src/kubevirt.io/api/instancetype:go_default_library",
        "//staging/src/kubevirt.io/api/instancetype/v1beta1:go_default_library",
        "//staging/src/kubevirt.io/client-go/api:go_default_library",
        "//staging/src/kubevirt.io/client-go/containerizeddataimporter/fake:go_default_library",
        "//staging/src/kubevirt.io/client-go/kubecli:go_default_library",
        "//staging/src/kubevirt.io/client-go/kubevirt/fake:go_default_library",
        "//staging/src/kubevirt.io/client-go/kubevirt/typed/instancetype/v1beta1:go_default_library",
        "//staging/src/kubevirt.io/client-go/testutils:go_default_library",
        "//vendor/github.com/onsi/ginkgo/v2:go_default_library",
        "//vendor/github.com/onsi/gomega:go_default_library",
        "//vendor/go.uber.org/mock/gomock:go_default_library",
        "//vendor/k8s.io/api/admission/v1:go_default_library",
        "//vendor/k8s.io/api/authentication/v1:go_default_library",
        "//vendor/k8s.io/api/core/v1:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/api/equality:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/api/resource:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/types:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/util/validation/field:go_default_library",
        "//vendor/k8s.io/client-go/kubernetes/fake:go_default_library",
        "//vendor/k8s.io/client-go/tools/cache:go_default_library",
        "//vendor/kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1:go_default_library",
    ],
)
